﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EasyLinkerSDK.Enum
{
    public enum ClientErrorType
    {
        /// <summary>
        /// 成功
        /// </summary>
        SUCCESS = 0,

        /// <summary>
        /// 消息结构错误
        /// </summary>
        MESSAGE_BODY_ERROR = 300000,

        /// <summary>
        /// 格式错误 incorrect_format
        /// </summary>
        INCORRECT_FORMAT = 300001,

        /// <summary>
        /// MQTT服务没有启动
        /// </SUMMARY>
        MQTTSERVICE_NOT_START = 301002,

        /// <SUMMARY>
        /// 客户端TCP服务没有启动
        /// </SUMMARY>
        CLIENTTCPSERVICE_NOT_START = 301003,

        /// <SUMMARY>
        /// 客户端UDP服务没有启动
        /// </SUMMARY>
        CLIENTUDPSERVICE_NOT_START = 301004,

        /// <SUMMARY>
        /// 客户端HTTP服务没有启动
        /// </SUMMARY>
        CLIENTHTTPSERVICE_NOT_START = 301005,

        /// <SUMMARY>
        /// APP服务没有启动
        /// </SUMMARY>
        APPSERVICE_NOT_START = 301006,

        /// <SUMMARY>
        /// WEB服务没有启动
        /// </SUMMARY>
        WEBSERVICE_NOT_START = 301007,

        /// <summary>
        /// 控制指令不正确 invalidate control order
        /// </summary>
        INVALIDATE_CONTROL_ORDER = 300010,

        /// <summary>
        /// 服务异常 服务错误原因（方便观察原因） service_error
        /// </summary>
        SERVICE_ERROR = 300020,

        /// <summary>
        /// 服务已经关闭
        /// </summary>
        SERVICE_CLOSED = 300021,


        /// <summary>
        /// 设备不支持该操作 device not support
        /// </summary>
        NOT_SUPPORT_FUNCTION = 300030,

        /// <summary>
        /// 不支持的协议类型
        /// </summary>
        NOT_SUPPORT_PROTOCOLTYPE = 300031,

        /// <summary>
        /// 请求参数有误 invalidate params
        /// </summary>
        INVALIDATE_PARAMS = 300040,

        /// <summary>
        /// 设备未找到 device is not exist
        /// </summary>
        DEVICE_NOT_EXIST = 300050,

        /// <summary>
        /// 设备ID为空 deviceid_is_null
        /// </summary>
        DEVICEID_IS_NULL = 300051,

        /// <summary>
        /// 请求超时
        /// </summary>
        DEVICEID_RESPONSE_TIMEOUT = 300052,

        /// <summary>
        /// 请求错误
        /// </summary>
        DEVICEID_REQUEST_ERROR = 300053,

        /// <summary>
        /// 设备返回的数据错误
        /// </summary>
        DEVICEID_RESPONSE_ERROR = 300054,

        /// <summary>
        /// 设备离线状态 device is offline
        /// </summary>
        DEVICE_OFFLINE = 300060,

        /// <summary>
        /// access_token 无效（包括失效） access_token is invalidate
        /// </summary>
        KEY_INVALIDATE = 300070,

        /// <summary>
        /// payload is null
        /// </summary>
        PAYLOD_IS_NULL = 300080,

        /// <summary>
        /// Topic不支持
        /// </summary>
        TOPIC_NOT_MATCH = 300081,

        /// <summary>
        /// 不支持的action action_not_support
        /// </summary>
        ACTION_NOT_SUPPORT = 300090,

        /// <summary>
        /// 不支持的协议 protocol_not_support
        /// </summary>
        PROTOCOL_NOT_SUPPORT = 300100,

        /// <summary>
        /// 不支持的消息类型 messageType  msgtype_not_support
        /// </summary>
        MSGTYPE_NOT_SUPPORT = 300110,

        /// <summary>
        /// messageId 不能为空 messageid_cannot_null
        /// </summary>
        MESSAGEID_CANNOT_NULL = 300120,

        /// <summary>
        /// 消息中的用户ID和登录用户ID不符合 msguser_not_match_loguser
        /// </summary>
        MSGUSER_NOT_MATCH_LOGUSER = 300130,

        /// <summary>
        /// 消息认证失败 message_validate_failed
        /// </summary>
        MESSAGE_VALIDATE_FAILED = 300131,

        /// <summary>
        /// 请求内容为空 request_body_is_null
        /// </summary>
        REQUEST_BODY_IS_NULL = 300231,

        /// <summary>
        /// 请求内容过长 request_body_too_long
        /// </summary>
        REQUEST_BODY_TOO_LONG = 300232,

        /// <summary>
        /// 只支持本地请求
        /// </summary>
        ONLY_SUPPORT_LOCALHOST = 300240,

        /// <summary>
        /// Token验证失败
        /// </summary>
        TOKEN_VALIDATE_FAILED = 300234,

    }
}
